package com.bjb.vr.auth.controller;

import com.bjb.vr.auth.service.AuthFeignService;
import com.bjb.vr.common.ao.OpenTenantAo;
import com.bjb.vr.common.result.CommonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @description:
 * @author: hujingbo
 * @create: 2022-12-09 17:55
 **/
@Slf4j
@RestController
@RequestMapping("/api/auth/feign/v1")
public class AuthFeignController {

    @Resource
    private AuthFeignService authFeignService;


    /**
     * 获取租户信息
     *
     * @param openTenantAo
     * @return
     */
    @PostMapping("/queryTenantInfo")
    public CommonResult queryTenantInfo(@RequestBody OpenTenantAo openTenantAo) {
        Object object = authFeignService.queryTenantInfo(openTenantAo);
        return CommonResult.Ok().setResult(object);
    }
}
